#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int

#define RdCommand 0x01
#define PrgCommand 0x02
#define EraseCommand 0x03
#define Error 1
#define OK 0
#define WaitTime 0x01
sfr ISP_DATA = 0xe2;
sfr ISP_ADDRH = 0xe3;
sfr ISP_ADDRL = 0xe4;
sfr ISP_CMD = 0xe5;
sfr ISP_TRIG = 0xe6;
sfr ISP_CONTR = 0xe7;
void ISP_IAP_Enable();
void ISP_IAP_Disable();
void ISPcommon();
uchar byte_read(uint byte_addr);
void SectorErase(uint sector_addr);
void byte_write(uint byte_addr,uchar original_data);
void str_write(char *password);
void str_read(char *password);